package com.global.college.ui.fragment.training;

import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.TextView;

import com.global.college.R;
import com.global.college.base.BaseFragment;

import butterknife.BindView;

/**
 * 课程-目录
 */
public class CourseIntroFragment extends BaseFragment {
    @BindView(R.id.tv_intro)
    TextView tvIntro;

    protected static final String ARG_PARAM1 = "param1";
    protected String courseIntro;

    public CourseIntroFragment() {
    }

    public static CourseIntroFragment newInstance(String param1) {
        CourseIntroFragment fragment = new CourseIntroFragment();
        Bundle args = new Bundle();
        args.putString(ARG_PARAM1, param1);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            courseIntro = getArguments().getString(ARG_PARAM1);
        }
    }

    @Override
    public int getContentViewId() {
        return R.layout.fragment_course_intro;
    }

    @Override
    public void initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    }

    @Override
    protected void initData() {
        tvIntro.setText(Html.fromHtml(courseIntro));
    }

}
